﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 设计模式.建造者模式
{
    public class BuiderPatternDemo
    {
        public static void Test()
        {

            Meal vegMeal = MealBuilder.PrepareVegMeal();
            Console.WriteLine("VegMeal:");
            vegMeal.ShowItems();
            Console.WriteLine($"Cost:{vegMeal.GetCost()}");

            Console.WriteLine();

            Meal noVegMeal = MealBuilder.PrepareNoVegMeal();
            Console.WriteLine("NoVegMeal:");
            noVegMeal.ShowItems();
            Console.WriteLine($"Cost:{noVegMeal.GetCost()}");
        }
    }
}
